package com.roth.dubbo.controller;

import com.roth.dubbo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * author:  Wang Yunlong
 * times:    2016-01-24
 * purpose:
 **/
@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/getUser")
    @ResponseBody
    public Object getUser(@RequestParam(value = "id", required = true) long id) {
        return userService.getUser(id);
    }
}
